package com.example.service;



import com.example.dao.RecordMapper;
import com.example.dao.RecordMapper2;
import com.example.domain.Record;
import com.example.domain.Record2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class RecordService2 {

    @Autowired
    private RecordMapper2 recordMapper;

    public List<Record2> listAll(int patient_id) {
        return recordMapper.listAll(patient_id);
    }


    public int insert(Record2 record) {
        return recordMapper.insert(record);
    }

    public int update(Record2 record) {
        return recordMapper.update(record);
    }

    public Record2 getById(int id) {
        return recordMapper.getById(id);
    }

    public int delete(int id) {
        return recordMapper.delete(id);
    }


/*    public int update(Record medication) {

        return recordMapper.update(medication);
    }*/

}
